#pragma once

#include<iostream>
#include<string>
#include<stdio.h>
#include<mysql/mysql.h>
using namespace std;

class MYSQLUTILI {
private:
	static	MYSQL	connection;
	static	bool	initIsOkay;
	MYSQL_RES		*results_set;
	MYSQL_ROW		temp_row;
	MYSQL_FIELD		*fieldsOfColumn;
public:
	MYSQLUTILI(const char *h,unsigned int p,const char *u,const char *pwd,const char *db_name,const char *unix_socket,unsigned long client_flag);
	~MYSQLUTILI();
	// This result indicates the number of affected records in the database table.
	int executeForUpdate(char* exec_sql);
	// The result from this function can be filled to file type of csv and then you can open it like excel.
	string executeForResult(char* exec_sql);
};
